package com.example.dao;

import com.example.entity.User;
import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.data.neo4j.repository.query.Query;

/**
 *
 */
public interface UserRepository extends Neo4jRepository<User, Long> {

    @Query("MATCH (u:User) WHERE u.username = $username and u.password = $password RETURN u limit 1")
    User selectByUsernameAndPassword(String username, String password);
}
